<!-- MAIN CONTENT -->
<div id="content">

    <!--<div class="margin-bottom-10 clearfix padding-bottom-10" style="border-bottom: 2px solid black">
        <div class="pull-left">
            <strong class="font-lg txt-color-darken"><i class="glyphicon glyphicon-dashboard" style="vertical-align: middle"></i>SIM卡信息管理</strong>
        </div>
        <div class="pull-right margin-left-10">
            <strong class="font-lg">
                <i class="glyphicon glyphicon-ok-sign" style="vertical-align: middle;color: #709B70"></i>
                正常设备：<span style="background: #709B70;color: white;font-weight: 700;padding: 0 5px;border-radius: 3px">108</span>
            </strong>
        </div>
        <div class="pull-right margin-left-10">
            <strong class="font-lg">
                <i class="glyphicon glyphicon-info-sign" style="vertical-align: middle;color: #A10228"></i>
                报警设备：<span style="background: #A10228;color: white;font-weight: 700;padding: 0 5px;border-radius: 3px">108</span>
            </strong>
        </div>
        <div class="pull-right margin-left-10">
            <strong class="font-lg">
                <i class="glyphicon glyphicon-record" style="vertical-align: middle;color: #3176B1"></i>
                设备总数：<span style="background: #3176B1;color: white;font-weight: 700;padding: 0 5px;border-radius: 3px">108</span>
            </strong>
        </div>
    </div>-->
    <div smart-include="app/yksensor/views/sub-header.tpl.html"></div>

    <div class="clearfix margin-bottom-10">
        <div class="pull-left margin-right-20">
            <a class="btn btn-labeled btn-primary" data-toggle="modal" data-target="#Addsim"> <span class="btn-label"><i class="glyphicon glyphicon-plus"></i></span>添加SIM卡 </a>
        </div>
       
        <div class="pull-left margin-right-20">
            <strong class="font-md">手机号码：</strong>
            <input type="text" class="ipt_form" style="vertical-align: middle" ng-model="paginationConf.mobile">
        </div>
        <div class="pull-left margin-right-20">
            <strong class="font-md">组织机构：</strong>
            <input type="text" class="ipt_form" style="vertical-align: middle" ng-model="paginationConf.org">
        </div>
        <div class="pull-left margin-right-20">
            <a class="btn btn-primary btn-sm" href-void="" ng-click="select()">查询</a>
        </div>
        <!-- <div class="pull-left margin-right-20">
            <a class="btn btn-success btn-sm" href-void="" href="#">打印</a>
        </div> -->
    </div>
    <div class="table-responsive">
        <table class="table table-bordered table-hover no-margin font-sml table-striped sensor_table">
            <thead>
            <tr>
                
                <th>操作</th>
                <th class="text-align-center">手机</th>
                <th class="text-align-center">设备编号</th>
                <th class="text-align-center">组织机构</th>
                <th class="text-align-center">启用日期</th>
                <th class="text-align-center">套餐费用</th>
                <th class="text-align-center">每月浏览</th>
                <th class="text-align-center">运营商</th>
                <th class="text-align-center">SIM卡号码</th>
                <th class="text-align-center">是否被绑定</th>
                <th class="text-align-center">描述</th>
                <th class="text-align-center">业务类型</th>
                <th class="text-align-center">类型</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="data in datas">
            
                <td>
                    <button class='btn btn-xs btn-default' uib-tooltip='编辑' tooltip-append-to-body='true' ng-click="showEditSim(data)"><i class='fa fa-pencil'></i></button>
                    <button class='btn btn-xs btn-default' uib-tooltip='删除' tooltip-append-to-body='true' ng-click="showDelDialog(data.id)"><i class='fa fa-times'></i></button>
                </td>

                <td class="text-align-center">{{data.mobile}}</td>
                <td class="text-align-center">{{data.deviceid}}</td>
                <td class="text-align-center">{{data.org}}</td>
                <td class="text-align-center">{{data.startday}}</td>
                <td class="text-align-center">{{data.fee}}</td>
                <td class="text-align-center">{{data.flow}}</td>
                <td class="text-align-center">{{data.yys}}</td>
                <td class="text-align-center">{{data.sim}}</td>
                <td class="text-align-center">{{data.bd}}</td>
                <td class="text-align-center">{{data.des}}</td>
                <td class="text-align-center">{{data.ywlx}}</td>
                <td class="text-align-center">{{data.memo}}</td>
            </tr>
            </tbody>
        </table>
    </div>
    <!-- end widget content -->
    <div class="dt-toolbar-footer">
        <tm-pagination conf="paginationConf"></tm-pagination>
    </div>

    <div class="modal fade" id="Addsim" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header bg-color-white">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        ×
                    </button>
                    <h6 class="modal-title txt-color-black">
                        新增SIM信息
                    </h6>
                </div>
                <div class="modal-body">
                    <form class="smart-form">
                        <div class="clearfix margin-bottom-10">
                            <div class="col-sm-3 text-align-right">
                                <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">手机号:</strong>
                            </div>
                            <div class="col-sm-7">
                                <input type="text" class="form-control" ng-model="insert.mobile">
                            </div>
                        </div>
                        <div class="clearfix margin-bottom-10">
                            <div class="col-sm-3 text-align-right">
                                <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">设备编号:</strong>
                            </div>


                            <div class="col-sm-7">
                                <select class="input-sm form-control" ng-model="insert.deviceid">
                                    <option ng-repeat="item in alldevice" value="{{item.deviceid}}">{{item.devicename}}</option>

                                </select> <i></i>
                            </div>
                        </div>
                        <div class="clearfix margin-bottom-10">
                            <div class="col-sm-3 text-align-right">
                                <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">组织机构:</strong>
                            </div>
                            <div class="col-sm-7">
                                
                                <input type="text" class="form-control" ng-model="insert.org">
                            </div>
                        </div>

                        <div class="clearfix margin-bottom-10">
                            <div class="col-sm-3 text-align-right">
                                <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">套餐费用:</strong>
                            </div>
                            <div class="col-sm-7">
                                <input type="text" class="form-control" ng-model="insert.fee">
                            </div>
                        </div>

                        <div class="clearfix margin-bottom-10">
                            <div class="col-sm-3 text-align-right">
                                <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">运营商:</strong>
                            </div>
                            <div class="col-sm-7">
                                
                                <input type="text" class="form-control" ng-model="insert.yys">
                            </div>
                        </div>

                        <div class="clearfix margin-bottom-10">
                            <div class="col-sm-3 text-align-right">
                                <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">SIM卡类型:</strong>
                            </div>
                            <div class="col-sm-7">
                                <input type="text" class="form-control" ng-model="insert.sim">
                            </div>
                        </div>

                      
                        <div class="clearfix margin-bottom-10">
                            <div class="col-sm-3 text-align-right">
                                <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">启用日期:</strong>
                            </div>
                            <div class="col-sm-7">
                                <input type="date" class="form-control" ng-model="insert.startday">
                            </div>
                        </div>

                        <div class="clearfix margin-bottom-10">
                            <div class="col-sm-3 text-align-right">
                                <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">每月流量:</strong>
                            </div>
                            <div class="col-sm-7">
                                <input type="text" class="form-control" ng-model = "insert.flow">
                            </div>
                        </div>

                        <div class="clearfix margin-bottom-10">
                            <div class="col-sm-3 text-align-right">
                                <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">业务类型:</strong>
                            </div>
                            <div class="col-sm-7">
                                
                                <input type="text" class="form-control" ng-model="insert.ywlx">
                            </div>
                        </div>

                        <div class="clearfix margin-bottom-10">
                            <div class="col-sm-3 text-align-right">
                                <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">描述:</strong>
                            </div>
                            <div class="col-sm-7">
                                <textarea class="form-control" ng-model="insert.des"></textarea>
                            </div>
                        </div>

                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        取消
                    </button>
                    <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="insertdata()">
                        保存
                    </button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
    
   <!-- 编辑框 -->
      
    <div class="modal fade" id="editsim" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header bg-color-white">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        ×
                    </button>
                    <h6 class="modal-title txt-color-black">
                       编辑SIM信息
                    </h6>
                </div>
                <div class="modal-body">
                    <form class="smart-form">
                        <div class="clearfix margin-bottom-10">
                            <div class="col-sm-3 text-align-right">
                                <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">手机号:</strong>
                            </div>
                            <div class="col-sm-7">
                                <input type="text" class="form-control" ng-model="editdata.mobile">
                            </div>
                        </div>
                        <div class="clearfix margin-bottom-10">
                            <div class="col-sm-3 text-align-right">
                                <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">设备编号:</strong>
                            </div>


                            <div class="col-sm-7">
                                <select class="input-sm form-control" ng-model="editdata.deviceid">
                                    <option ng-repeat="item in alldevice" value="{{item.deviceid}}">{{item.devicename}}</option>

                                </select> <i></i>
                            </div>
                        </div>
                        <div class="clearfix margin-bottom-10">
                            <div class="col-sm-3 text-align-right">
                                <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">组织机构:</strong>
                            </div>
                            <div class="col-sm-7">

                                <input type="text" class="form-control" ng-model="editdata.org">
                            </div>
                        </div>

                        <div class="clearfix margin-bottom-10">
                            <div class="col-sm-3 text-align-right">
                                <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">套餐费用:</strong>
                            </div>
                            <div class="col-sm-7">
                                <input type="text" class="form-control" ng-model="editdata.fee">
                            </div>
                        </div>

                        <div class="clearfix margin-bottom-10">
                            <div class="col-sm-3 text-align-right">
                                <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">运营商:</strong>
                            </div>
                            <div class="col-sm-7">

                                <input type="text" class="form-control" ng-model="editdata.yys">
                            </div>
                        </div>

                        <div class="clearfix margin-bottom-10">
                            <div class="col-sm-3 text-align-right">
                                <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">SIM卡类型:</strong>
                            </div>
                            <div class="col-sm-7">
                                <input type="text" class="form-control" ng-model="editdata.sim">
                            </div>
                        </div>


                        <div class="clearfix margin-bottom-10">
                            <div class="col-sm-3 text-align-right">
                                <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">启用日期:</strong>
                            </div>
                            <div class="col-sm-7">
                                <input type="date" class="form-control" ng-model="editdata.startday">
                            </div>
                        </div>

                        <div class="clearfix margin-bottom-10">
                            <div class="col-sm-3 text-align-right">
                                <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">每月流量:</strong>
                            </div>
                            <div class="col-sm-7">
                                <input type="text" class="form-control" ng-model="editdata.flow">
                            </div>
                        </div>

                        <div class="clearfix margin-bottom-10">
                            <div class="col-sm-3 text-align-right">
                                <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">业务类型:</strong>
                            </div>
                            <div class="col-sm-7">

                                <input type="text" class="form-control" ng-model="editdata.ywlx">
                            </div>
                        </div>

                        <div class="clearfix margin-bottom-10">
                            <div class="col-sm-3 text-align-right">
                                <strong class="margin-right-5" style="line-height: 32px; font-size: 15px">描述:</strong>
                            </div>
                            <div class="col-sm-7">
                                <textarea class="form-control" ng-model="editdata.des"></textarea>
                            </div>
                        </div>

                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        取消
                    </button>
                    <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="updatedata()">
                        保存
                    </button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>

    <div class="modal fade" id="showDelDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        ×
                    </button>
                    <h4 class="modal-title">信息</h4>
                </div>
                <div class="modal-body">
                    <p>
                        您确实要删除选中SIM卡吗？
                    </p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        关闭
                    </button>
                    <button type="button" class="btn btn-primary" ng-click="delsim()">
                        删除SIM卡
                    </button>
                </div>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->

</div>
<!-- END MAIN CONTENT -->



